package com.ruoyi.qyj.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qyj.mapper.TbRecordInfoMapper;
import com.ruoyi.qyj.domain.TbRecordInfo;
import com.ruoyi.qyj.service.ITbRecordInfoService;

/**
 * 信息互通Service业务层处理
 * 
 * @author yellow
 * @date 2023-09-14
 */
@Service
public class TbRecordInfoServiceImpl implements ITbRecordInfoService 
{
    @Autowired
    private TbRecordInfoMapper tbRecordInfoMapper;

    /**
     * 查询信息互通
     * 
     * @param recordId 信息互通主键
     * @return 信息互通
     */
    @Override
    public TbRecordInfo selectTbRecordInfoByRecordId(Long recordId)
    {
        return tbRecordInfoMapper.selectTbRecordInfoByRecordId(recordId);
    }

    /**
     * 查询信息互通列表
     * 
     * @param tbRecordInfo 信息互通
     * @return 信息互通
     */
    @Override
    public List<TbRecordInfo> selectTbRecordInfoList(TbRecordInfo tbRecordInfo)
    {
        return tbRecordInfoMapper.selectTbRecordInfoList(tbRecordInfo);
    }

    /**
     * 新增信息互通
     * 
     * @param tbRecordInfo 信息互通
     * @return 结果
     */
    @Override
    public int insertTbRecordInfo(TbRecordInfo tbRecordInfo)
    {
        tbRecordInfo.setCreateTime(DateUtils.getNowDate());
        return tbRecordInfoMapper.insertTbRecordInfo(tbRecordInfo);
    }

    /**
     * 修改信息互通
     * 
     * @param tbRecordInfo 信息互通
     * @return 结果
     */
    @Override
    public int updateTbRecordInfo(TbRecordInfo tbRecordInfo)
    {
        tbRecordInfo.setUpdateTime(DateUtils.getNowDate());
        return tbRecordInfoMapper.updateTbRecordInfo(tbRecordInfo);
    }

    /**
     * 批量删除信息互通
     * 
     * @param recordIds 需要删除的信息互通主键
     * @return 结果
     */
    @Override
    public int deleteTbRecordInfoByRecordIds(Long[] recordIds)
    {
        return tbRecordInfoMapper.deleteTbRecordInfoByRecordIds(recordIds);
    }

    /**
     * 删除信息互通信息
     * 
     * @param recordId 信息互通主键
     * @return 结果
     */
    @Override
    public int deleteTbRecordInfoByRecordId(Long recordId)
    {
        return tbRecordInfoMapper.deleteTbRecordInfoByRecordId(recordId);
    }
}
